<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.model.PostCheck"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.util.Util"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%
{	
	Long thePostcheckID = 0l;
	Integer theYear = 0;
	Integer theMonth = 0;
	String displayBtnStr =  (String)request.getParameter(Constants.REQUEST_PARAMETER_DISPLAY);
	String thePostcheckIDStr = (String)request.getParameter(Constants.REQUEST_PARAMETER_POSTCHECK_ID);
	try{
		thePostcheckID = Long.parseLong(thePostcheckIDStr);
	} catch (Exception e){
		
	}
	try{
		theYear = Integer.parseInt(request.getParameter(Constants.REQUEST_PARAMETER_YEAR));
	}catch(Exception e){
		
	}
	
	
	try{
		theMonth = Integer.parseInt(request.getParameter(Constants.REQUEST_PARAMETER_MONTH));
	}catch(Exception e){
		
	}
	PostCheck thePostcheck = DaoCreator.createPostCheckDao().getPostCheck(thePostcheckID);
	
	int yearStart = 2000;
	int yearEnd = 2050;	
	
	
%>
选择年月：
<select id="year" onchange="selectYear()">
	<%for (int y = yearStart; y<=yearEnd; y++){ %>
	<option value="<%=y %>" <%=y==theYear?"selected":""%>><%=y %></option>
	<%} %>
</select>年
<select id="month" onchange="selectMonth()">
	<%for (int m = 1; m<=12; m++){ %>
	<option value="<%=m %>" <%=m==theMonth?"selected":""%>><%=m %></option>
	<%} %>
</select>月

<%if(Util.isNullOrEmpty(displayBtnStr)) {%>
<span style="margin-left: 10px; font-weight: bold">《<%=thePostcheck.getCheckName() %>岗检记录月表/周表浏览》</span><input type="button" id="btnGenerate" onclick="openPostcheckMonthReport()" value="生成"/>
<%
}
}
%>